<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>RaftLib: KernelContainer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">RaftLib
   &#160;<span id="projectnumber">0.3a</span>
   </div>
   <div id="projectbrief">C++ Stream Processing Template Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_kernel_container-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">KernelContainer Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="kernelcontainer_8hpp_source.html">kernelcontainer.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8fa1a07ccbf48f9c651a04a4ccdffb26"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_kernel_container.html#a8fa1a07ccbf48f9c651a04a4ccdffb26">KernelContainer</a> ()</td></tr>
<tr class="separator:a8fa1a07ccbf48f9c651a04a4ccdffb26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb10d106cf0868cbe26ce2d91dfc4bca"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_kernel_container.html#acb10d106cf0868cbe26ce2d91dfc4bca">size</a> () -&gt; decltype(list.size())</td></tr>
<tr class="separator:acb10d106cf0868cbe26ce2d91dfc4bca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff41ce0192f1968d33f7ac7be66d6d92"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_kernel_container.html#aff41ce0192f1968d33f7ac7be66d6d92">removeKernel</a> (<a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *kernel)</td></tr>
<tr class="separator:aff41ce0192f1968d33f7ac7be66d6d92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fcb08dfc9125397545a839ba8a5f585"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_kernel_container.html#a4fcb08dfc9125397545a839ba8a5f585">addKernel</a> (<a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *kernel)</td></tr>
<tr class="separator:a4fcb08dfc9125397545a839ba8a5f585"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebae93c9054d7a33bdf37e051446ab51"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_kernel_container.html#aebae93c9054d7a33bdf37e051446ab51">begin</a> () -&gt; KernelIterator&lt; decltype(list.begin()) &gt;</td></tr>
<tr class="separator:aebae93c9054d7a33bdf37e051446ab51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0aac1ca85d838f240a4ac18833839362"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_kernel_container.html#a0aac1ca85d838f240a4ac18833839362">end</a> () -&gt; KernelIterator&lt; decltype(list.end()) &gt;</td></tr>
<tr class="separator:a0aac1ca85d838f240a4ac18833839362"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a866792327581fc054f1f1dc79007427a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a866792327581fc054f1f1dc79007427a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>lock</b> ()</td></tr>
<tr class="separator:a866792327581fc054f1f1dc79007427a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6643cf277ab77fa3978fdb1a2f1477f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab6643cf277ab77fa3978fdb1a2f1477f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>unlock</b> ()</td></tr>
<tr class="separator:ab6643cf277ab77fa3978fdb1a2f1477f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d3a09748aaaffdb06a927663893534b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d3a09748aaaffdb06a927663893534b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>clear</b> ()</td></tr>
<tr class="separator:a7d3a09748aaaffdb06a927663893534b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a98ffec9228f092cda43f8f89dda7cca1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a98ffec9228f092cda43f8f89dda7cca1"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>KernelIterator&lt; decltype(list.begin()) &gt;</b></td></tr>
<tr class="separator:a98ffec9228f092cda43f8f89dda7cca1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="kernelcontainer_8hpp_source.html">kernelcontainer.hpp</a> - simple container with lockable iterators for use with <a class="el" href="classraft_1_1kernel.html">raft::kernel</a> objects.</p>
<dl class="section author"><dt>Author</dt><dd>: Jonathan Beard </dd></dl>
<dl class="section version"><dt>Version</dt><dd>: Wed Jan 14 08:12:47 2015</dd></dl>
<p>Copyright 2015 Jonathan Beard</p>
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:</p>
<p><a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></p>
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8fa1a07ccbf48f9c651a04a4ccdffb26"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KernelContainer::KernelContainer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Contstructor for a container for <a class="el" href="classraft_1_1kernel.html">raft::kernel</a> objects</p>
<p>kernelcontainer.cpp - </p><dl class="section author"><dt>Author</dt><dd>: Jonathan Beard </dd></dl>
<dl class="section version"><dt>Version</dt><dd>: Wed Jan 14 08:12:47 2015</dd></dl>
<p>Copyright 2015 Jonathan Beard</p>
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:</p>
<p><a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></p>
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4fcb08dfc9125397545a839ba8a5f585"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KernelContainer::addKernel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *&#160;</td>
          <td class="paramname"><em>kernel</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>addKernel - add a kernel to this container. Gains a lock before committing the kernel to the data structure. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">raft::kernel*,kernel</td><td>to be added </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aebae93c9054d7a33bdf37e051446ab51"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">auto KernelContainer::begin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> -&gt; KernelIterator&lt; decltype( list.begin() ) &gt;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>begin - returns an iterator to the first kernel in the list, future behavior might produce a priority type ordering, but this should be handled by the iterator and its sub-classes. Iterator is thread safe! </p><dl class="section return"><dt>Returns</dt><dd>KernelIterator </dd></dl>

</div>
</div>
<a class="anchor" id="a0aac1ca85d838f240a4ac18833839362"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">auto KernelContainer::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> -&gt; KernelIterator&lt; decltype( list.end() ) &gt;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>end - returns an iterator to one past the last kernel in the list, this cannot be relied upon to be the last element since the iterator does not define a &ndash; operator, so really it can just be used for detecting when all the kernels have been iterated through. </p><dl class="section return"><dt>Returns</dt><dd>KernelIterator </dd></dl>

</div>
</div>
<a class="anchor" id="aff41ce0192f1968d33f7ac7be66d6d92"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KernelContainer::removeKernel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *&#160;</td>
          <td class="paramname"><em>kernel</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>removeKernel - call to remove the kernel specified as the param, which must not be null. The function first gains a lock on the list then proceeds to remove it. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">kernel</td><td>- <a class="el" href="classraft_1_1kernel.html">raft::kernel</a> const * </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool, true if removed, false otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="acb10d106cf0868cbe26ce2d91dfc4bca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">auto KernelContainer::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> -&gt; decltype( list.size() )</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>size - return the number of kernels currently assigned </p><dl class="section return"><dt>Returns</dt><dd>std::size_t </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="kernelcontainer_8hpp_source.html">kernelcontainer.hpp</a></li>
<li>kernelcontainer.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 19 2015 14:14:01 for RaftLib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
